package br.uefs.dexa.rfframework.gui;

import br.uefs.dexa.rfframework.gui.factory.GUIAbstractFactory;
import br.uefs.dexa.rfframework.gui.interfaces.RFUserGUI;
import br.unicamp.ic.lis.rfframework.impl.interfaces.IUserActionListener;
import br.unicamp.ic.lis.rfframework.objects.DigitalObject;
import br.unicamp.ic.lis.rfframework.objects.DigitalObjectSet;
import br.unicamp.ic.lis.rfframework.objects.LabeledDigitalObject;

public class GUIActionListener implements IUserActionListener {

	@Override
	public DigitalObjectSet<LabeledDigitalObject> indicationOfQueryPattern(
			DigitalObjectSet<DigitalObject> collection) {
		
		return getGUI().indicationOfQueryPattern(collection);
	}

	@Override
	public boolean showSetOfObjects(
			DigitalObjectSet<DigitalObject> retrievedObjects) {
		
		return getGUI().showSetOfObjects(retrievedObjects);
	}

	@Override
	public DigitalObjectSet<LabeledDigitalObject> userIndicationOfObjectsRelevance(
			DigitalObjectSet<DigitalObject> retrievedObjects,
			DigitalObjectSet<LabeledDigitalObject> queryPattern) {
		
		return getGUI().userIndicationOfObjectsRelevance(retrievedObjects, queryPattern);
	}
	
	private RFUserGUI getGUI() 
	{
		return GUIAbstractFactory.getInstance().getGUI();
	}

	
}
